package com.ptu.entity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

public class SeckillOrder implements Serializable {
    private Long id;                // 订单ID
    private Long productId;         // 秒杀商品ID
    private Long userId;            // 用户ID
    private String name;           // 商品名称
    private BigDecimal price;       // 秒杀价格
    private Date payTime;           // 支付时间
    private Integer status;        // 状态：0-未支付，1-已支付，2-已完成，3-退款中，4-已退款,5-已取消
    private Date createdTime;       // 创建时间
    private Date updatedTime;       // 修改时间

    // 构造方法
    public SeckillOrder() {
    }

    public SeckillOrder(Long id, Long productId, Long userId, String name, BigDecimal price, Date payTime, Integer status, Date createdTime, Date updatedTime) {
        this.id = id;
        this.productId = productId;
        this.userId = userId;
        this.name = name;
        this.price = price;
        this.payTime = payTime;
        this.status = status;
        this.createdTime = createdTime;
        this.updatedTime = updatedTime;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getProductId() {
        return productId;
    }

    public void setProductId(Long productId) {
        this.productId = productId;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public Date getPayTime() {
        return payTime;
    }

    public void setPayTime(Date payTime) {
        this.payTime = payTime;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Date getCreatedTime() {
        return createdTime;
    }

    public void setCreatedTime(Date createdTime) {
        this.createdTime = createdTime;
    }

    public Date getUpdatedTime() {
        return updatedTime;
    }

    public void setUpdatedTime(Date updatedTime) {
        this.updatedTime = updatedTime;
    }

    @Override
    public String toString() {
        return "SeckillOrder{" +
                "id=" + id +
                ", productId=" + productId +
                ", userId=" + userId +
                ", name='" + name + '\'' +
                ", price=" + price +
                ", payTime=" + payTime +
                ", status=" + status +
                ", createdTime=" + createdTime +
                ", updatedTime=" + updatedTime +
                '}';
    }
}